package com.xindaoapp.happypet.ui;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.xindaoapp.happypet.R;
import com.xindaoapp.happypet.utils.CommonParameter;
import com.xindaoapp.happypet.utils.Constants;


/**
 * 打榜及达人规则详情
 * 
 * @author Yangqing
 * 
 */
public class GuiZeActivity extends BaseActivity {
    private ImageView iv_picture;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initViews() {
        super.initViews();
        String guize = getIntent().getStringExtra(Constants.GUIZE);
        iv_picture = (ImageView) findViewById(R.id.iv_picture);

        iv_picture.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                CommonParameter.sScreenWidth * 1058 / 640));

        if ("daren".equals(guize)) {
            setTopBarTitle(getResources().getString(R.string.darenguize));
            iv_picture.setBackgroundResource(R.drawable.guize_daren);
        } else if ("bang".equals(guize)) {
            setTopBarTitle(getResources().getString(R.string.shangbang));
            iv_picture.setBackgroundResource(R.drawable.guize_bang);
        }

    }

    @Override
    protected int getTopBarLeftImageViewRes() {
        return R.drawable.top_bar_back;
    }

    @Override
    protected OnClickListener getLeftViewClickListener() {
        return new OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        };
    }

    @Override
    protected int getContentViewResId() {
        // TODO Auto-generated method stub
        return R.layout.layout_guize;
    }

}
